package com.cskaoyan.day15;

public class GaptoUpperCase {
    public static void main(String[] args) {
        String str = "legendary";
        String newStr = "";
        for (int i = 0; i < str.length(); i++) {
            if (i % 2 != 0) {
                newStr += str.charAt(i);
                continue;
            }
            newStr += Character.toUpperCase(str.charAt(i));
        }
        System.out.println(newStr);
    }
}
